package q.test0421library.Moudle;

public enum BookStatus {
    DELETE(0,"无效"),
    NORMAL(1,"可借阅"),
    FORBIDDEN(2,"不可借阅");

    private int code;
    private String status;


    public static BookStatus getStatusBycode(int code){
        if(code==0) return DELETE;
        else if(code==1) return NORMAL;
        else return FORBIDDEN;
    }


     BookStatus(int code,String status){
        this.code=code;
        this.status=status;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
